<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
include "header.php";
include "/library/stock.php";

if(isset($_GET['delete'])){
    delete($_GET);
   // header('location: product.php');
}

?>




<div name="multivalue" align="center" width="100%">
    <table  id="tableSmall" >
        <tr>
            <th>รหัสสินค้า</th>
            <th >ประเภทการขาย</th>
            <th>อัตราส่วน</th>
            <th>จำนวน</th>
            <th></th>
        </tr>
        <?php

            $product = showAll();
            while ($print = mysql_fetch_array($product)){
                

                ?>

        <tr>
            <td><?=$print['product_id']; ?>
            <td ><?=$print['name']; ?></td>
            <td ><?=$print['ratio']; ?></td>
            <td ><?=$print['amount']; ?> <?=$print['nameunit']; ?></td>
            <td><a href="stock.php?delete=&id=<?=$print['id'];?>&product=<?=$print['product_id'];?>&ratio=<?=$print['ratio']; ?>&amount=<?=$print['amount']; ?> "><input type="button" value="ลบ"></a></td>
        </tr>


        <?php }  ?>
    </table>

    <p>
    </p>

</div>
